Microcontrollers are usually general purpose integrated circuits. To facilitate use in multiple different applications, a microcontroller may include an amount of general purpose analog circuitry. Such general purpose analog circuitry may, for example, involve an operational amplifier that can be used to perform filtering and amplification on an input signal prior to subsequent analog-to-digital conversion by another part of the general purpose analog circuitry. Providing the analog circuitry (the operational amplifier and the analog-to-digital converter) on the microcontroller integrated circuit allows the microcontroller to perform periodic measurements of the input signal.
Not only is the microcontroller to perform the periodic measurement function, but the microcontroller is also to consume a very small amount of power so that the microcontroller can be powered from a battery. Low power consumption is desired in order to extend battery life. To reduce power consumption, the microcontroller may have a low power sleep mode of operation. In the low power sleep mode, only a small amount of circuitry (for example, a low power clock generator and a sleep mode timing circuit) is powered. The remainder of the microcontroller circuitry (the digital processor, the analog circuitry, memory, and any other circuitry) is powered down, thereby reducing power consumption. Then, when the microcontroller is to perform its functions, the sleep mode timing circuitry supplies a power up signal to the remainder of the microcontroller circuitry. The remainder of the microcontroller circuitry powers up and performs its functions. Once the functions have been performed, the sleep mode timing circuitry supplies a power-down signal to the remainder of the microcontroller circuitry. By maintaining the microcontroller in the low power sleep mode for the majority of time, overall power consumption is reduced. On the market today, there are many different variations of sleep mode functionality for putting a microcontroller in sleep mode. The description above is a simplified explanation of just one example of such sleep mode functionality.
Powering up the digital processor portion of the microcontroller is generally relatively fast because transistors in the digital circuitry are generally small and in operation are either on or off. Voltages on internal nodes within the digital circuitry are generally at a digital high voltage or a digital low voltage. The noise margin in such digital circuitry is high, and the capacitances of internal nodes within the digital circuitry are typically relatively small. As a consequence, there is usually only a small delay after power and ground voltages are supplied to the digital circuitry before the digital circuitry is operational.
In comparison to the digital circuitry, the analog circuitry of the microcontroller may take a relatively longer amount of time to power up and become operational. Transistors in the analog circuitry are often larger and not just either on or off, but rather may operate in their linear regions. Voltages on internal nodes with the analog circuitry during circuit operation are often to be at voltages other than a digital high voltage or a digital low voltage. These are often determined by the combination of resistor values and available current. Internal nodes within the analog circuitry may often have relatively large capacitances. Due to these reasons, it may take a relatively larger amount of time after power and ground voltages are supplied for voltages to stabilize and for the analog circuitry to be operational.
Consider a microcontroller application where the microcontroller includes analog circuitry that is to be used to perform a periodic measurement function. The sleep mode timer and clock generator supplies a power-on signal to the remainder of the microcontroller circuitry. Power and ground voltages are supplied to the digital processor and the analog circuitry. The digital circuitry is operational and ready to perform processing, but it may be as long as a few hundred milliseconds before the analog circuitry is operational. Where the analog function involves performing a measurement using the analog circuitry, the measurement cannot take place until a few hundred milliseconds have expired. The measurement is then taken, and the sleep mode timer again asserts the power-down signal. The microcontroller again enters low power sleep mode operation. This periodic powering up of the microcontroller allows the microcontroller to perform periodic measurements while operating for the majority of the time in the low power sleep mode. This is desirable, but unfortunately there is a relatively large period of time (for example, a few milliseconds) that the microcontroller is not fully operational following each assertion of the power-on signal. Having to wait this period of time to perform an analog measurement is undesirable. Moreover, the digital processor of the microcontroller may be clocked during this time and consequently the digital processor may be consuming a significant amount of power during this time. A solution is desired.